#!/usr/bin/env python3

import pyautogui

print('Press Ctrl-c to quit.')
# pyautogui.click(100, 200, button='right')
# pyautogui.moveRel(40,74, duration=0.25)
# pyautogui.click(140, 274, duration=1)
pyautogui.click(1816, 51, duration=0.25)
pyautogui.moveTo(1680, 375, duration=0.25)
pyautogui.click(1680, 375, duration=0.25)
pyautogui.moveTo(109, 16, duration=1)

try:
    while True:
        x, y = pyautogui.position()
        positionStr = 'X:' + str(x).rjust(4) + ' Y:' + str(y).rjust(4)
        print(positionStr, end='')
        print('\b' * len(positionStr), end='', flush=True)
except KeyboardInterrupt:
    print('\nDone!')
